/**
 * 
 */

/**
 * @author mingfan
 *
 */
public class Consumer implements Runnable {

	private Drop dropMessage = null;
	/**
	 * 
	 */
	public Consumer(Drop drop) {
		this.dropMessage = drop;
	}
	
	/* (non-Javadoc)
	 * @see java.lang.Runnable#run()
	 */
	@Override
	public void run() {
		
		while (true) {
			String message = dropMessage.take();
			Utility.putThreadMessage("take " + message);
			
			if (message.equalsIgnoreCase("none")) {
				Utility.putThreadMessage("get none, stop.");
				break;
			}
		}
		
	}

}
